<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta content="telephone=no" name="format-detection" />
	<meta name="Description" content=""/>
	<meta name="Keywords" content=""/>
	<link href="favicon.ico" mce_href="favicon.ico" rel="bookmark" type="image/x-icon" />
	<link href="favicon.ico" mce_href="favicon.ico" rel="icon" type="image/x-icon" />
	<link href="favicon.ico" mce_href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
	<title>盖网魔盒</title>
	<link rel="stylesheet" href="css/reset.css">
	<link rel="stylesheet" href="css/styles.css">
	<script src="js/jquery-2.2.2.min.js"></script>
	<script src="js/jquery.flexslider-min.js"></script>
	<script src="js/common.js"></script>
	<script src="json/appJson.js"></script>	
	<script>
	$(function(){
		if(window.name=="gwmhLogined"){
			$("#authentication").attr("href","hasLogined.html");
		}

		$(".nav a").click(function(){
			var num=$(this).attr("tag");
			$(".nav a").removeClass("active");
			$(this).addClass("active");
			$(".app-list").hide();
			$("#app-type"+num).show();
		});

		var pre_pid=0;
		var count=0;
		$(appData).each(function(){					
			var pid = this.pid;
			var href = this.href;
			var img = this.img;
			var appName = this.appName;	
			var li="<li><a href='"+href+"' title='"+appName+"'><img src='"+img+"' alt='"+appName+"'/><span class='app-name'>"+appName+"</div>";
			if(pid!=pre_pid){
				count=0;
			}
			if(count<2){
				$("#app-type"+pid).find(".recomment-app").append(li+"</a></li>");
			}else{
				$("#app-type"+pid).find(".common-app").append(li+"<div class=decoration></div></a></li>");
			}
			count++;
			pre_pid=pid;								
		});
	})
	</script>	
</head>
<body>
	<header class="header">
		<a href="javascript:history.go(-1)" class="reback"></a>
	</header>
	<nav class="nav">
		<a href="javascript:void(0);" class="active" tag="0">工具</a>
		<a href="javascript:void(0);" tag="1">摄影</a>
		<a href="javascript:void(0);" tag="2">效率</a>
		<a href="javascript:void(0);" tag="3">娱乐</a>
		<a href="javascript:void(0);" tag="4">阅读</a>
	</nav>
	<section class="container">
		<div class="banner plate-banner">
			<ul class="slides">
				<li><a href="#" title="banner1"><img src="images/temp/banner/appBanner01.jpg" alt="banner1" /></a></li>
				<li><a href="#" title="banner2"><img src="images/temp/banner/appBanner02.jpg" alt="banner2" /></a></li>
				<li><a href="#" title="banner3"><img src="images/temp/banner/appBanner03.jpg" alt="banner3" /></a></li>
			</ul>
			<div class="decoration"></div>
		</div>
		<div class="gray-wrap">
			<div class="app-list" id="app-type0">
				<ul class="recomment-app clearfix"></ul>			
				<ul class="common-app clearfix"></ul>
			</div>
			<div class="app-list hide" id="app-type1">
				<ul class="recomment-app clearfix"></ul>			
				<ul class="common-app clearfix"></ul>
			</div>
			<div class="app-list hide" id="app-type2">
				<ul class="recomment-app clearfix"></ul>			
				<ul class="common-app clearfix"></ul>
			</div>
			<div class="app-list hide" id="app-type3">
				<ul class="recomment-app clearfix"></ul>			
				<ul class="common-app clearfix"></ul>
			</div>
			<div class="app-list hide" id="app-type4">
				<ul class="recomment-app clearfix"></ul>			
				<ul class="common-app clearfix"></ul>
			</div>
		</div>						
	</section>
	<footer class="footer">
		<ul class="menu clearfix">
			<li>
				<a href="index.html">
					<i class="icon ico-01 active"></i>
					<span>主页</span>
				</a>
			</li>
			<li>
				<a href="login.html" id="authentication">
					<i class="icon ico-02"></i>
					<span>认证上网</span>
				</a>
			</li>
			<li>
				<a href="social.html">
					<i class="icon ico-03"></i>
					<span>局域社交</span>
				</a>
			</li>
		</ul>
	</footer>	
</body>
</html>